import base from './base'

export default class News extends base {
    static async getList(options) {
        const url = `${this.baseUrl}/adm/news/push/list`
        return this.get(url, options)
    }
    static async getNewDetail(options) {
        const url = `${this.baseUrl}/adm/news/push/detail`
        return this.get(url, options)
    }
    static async saveArticle(options,urlType) {
        let url = "";
        if (urlType == 'add') {
            url = `${this.baseUrl}/adm/news/push/add`
        }
        else if (urlType == 'againEdit') {
            url = `${this.baseUrl}/adm/news/push/edit`
        }
        return this.post(url, options)
    }
    static async updatestatus(options) {
        const url = `${this.baseUrl}/adm/news/push/updatestatus`
        return this.post(url, options)
    }
}
